package com.trt.beibei.repository;

import com.trt.beibei.model.Activity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface ActivityRepository extends JpaRepository<Activity, Long> {

    Activity findByName(String name);

    // List<Activity> findByStartTimeLessThanAndEndTimeGreaterThanAndCategoryListId(Date date, Date date1, Long categoryId);

    Optional<Activity> findByCouponListId(Long couponId);

}
